package com.project.dao.implement;

import org.apache.ibatis.session.SqlSession;

import com.project.dao.AccountDataStatisticMapper;
import com.project.dao.GetDirectAccountMapper;
import com.project.utils.SessionFactoryGen;
import com.project.bean.GetDirectAccount;
import java.util.List;
import java.util.Map;

public class GetDirectAccountImpl implements GetDirectAccountMapper{
	@Override
	public List<GetDirectAccount>  GetInDirectAccountList(Map param)
	{
		List<GetDirectAccount> result= null;
		SqlSession sqlSession = SessionFactoryGen.getSessionFactory().openSession();  
		try
		  {
			GetDirectAccountMapper mapper =  sqlSession.getMapper(GetDirectAccountMapper.class);
			  result = mapper.GetInDirectAccountList(param);
			 // sqlSession.commit();
		  }
		  catch(Exception e)
		  {
			  e.printStackTrace();
		  }
		  finally
		  {
			  sqlSession.close();
		  }
		return result;
	}
	
	@Override
	public List<GetDirectAccount>  GetOutDirectAccountList(Map param)
	{
		List<GetDirectAccount> result= null;
		SqlSession sqlSession = SessionFactoryGen.getSessionFactory().openSession();  
		try
		  {
			GetDirectAccountMapper mapper =  sqlSession.getMapper(GetDirectAccountMapper.class);
			  result = mapper.GetOutDirectAccountList(param);
			 // sqlSession.commit();
		  }
		  catch(Exception e)
		  {
			  e.printStackTrace();
		  }
		  finally
		  {
			  sqlSession.close();
		  }
		return result;
	}
}
